﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Threading;

namespace QianBuo.Lottery.Server
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            
            bool createdNew = true;
            Mutex m = new Mutex(true, "QianBuo.Lottery.Server", out   createdNew);
            if (createdNew)
            {
                Application.Run(new MainForm());
                m.ReleaseMutex();
                Application.Exit();
            }
            else
            {
                MessageBox.Show("本程序只允许同时运行一个");
            }
        }
    }
}
